Component org.nuxeo.ecm.core.work.service
In bundle org.nuxeo.ecm.core.event
Documentation
The WorkManager executes Work instances asynchronously.
Resolution Order
144
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime
framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.
Start Order
10
(Declared Start Order: -501)
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.
Implementation
Class:
org.nuxeo.ecm.core.work.WorkManagerImpl
Services
Extension Points
XML Source
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.work.service" version="1.0">
<documentation>
The WorkManager executes Work instances asynchronously.
</documentation>
<service>
<provide interface="org.nuxeo.ecm.core.work.api.WorkManager" />
</service>
<implementation class="org.nuxeo.ecm.core.work.WorkManagerImpl" />
<extension-point name="queues">
<documentation>
Defines the characteristics of work queues:
<code>
<queue id="myqueue">
<name>My Queue</name>
<maxThreads>4</maxThreads>
<capacity>100</capacity>
<clearCompletedAfterSeconds>300</clearCompletedAfterSeconds>
<category>somecategory1</category>
<category>somecategory2</category>
</queue>
</code>
- id is the queue id.
- name is the human-readable name.
- maxThreads maximum number of worker threads (default 4).
- capacity when specified make the queue bounded, the scheduling of
new work is blocking when the queue is full (default unlimited).
- clearCompletedAfterSeconds (default 3600) is the delay after which completed work
may be automatically cleared from its queue. 0 means never.
- category is a list of Work categories that this queue will receive.
For event listeners work, the category is the listener name (or its simple class name).
</documentation>
<object class="org.nuxeo.ecm.core.work.api.WorkQueueDescriptor" />
</extension-point>
<extension-point name="implementation">
<documentation>
Defines the implementation of the queuing mechanism:
<code>
<queuing class="org.nuxeo.ecm.core.redis.contribs.RedisWorkQueuing"/>
</code>
The class must be a subclass of org.nuxeo.ecm.core.work.WorkQueuing.
</documentation>
<object class="org.nuxeo.ecm.core.work.api.WorkQueuingDescriptor" />
</extension-point>
</component>